package com.zytool.easyrestful.demo.entity;

import com.zytool.easyrestful.core.GenericEntity;
import com.zytool.easyrestful.core.annotation.Condition;
import com.zytool.easyrestful.core.condition.Match;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Table;

@Data
@Table(name = "user")
@ApiModel(value = "用户表")
public class UserEntity extends GenericEntity {

    @ApiModelProperty("姓名")
    @Condition(match = Match.LIKE)
    private String name;

    @ApiModelProperty("年龄")
    @Condition(match = Match.RANGE, param1 = "ageFrom", param2 = "ageTo")
    private Integer age;

    @ApiModelProperty("性别")
    @Condition
    private String sex;

    @ApiModelProperty("介绍")
    private String introduce;
}
